<?php

$a = <<<aaa
<!-- pin -->
    <div style="border: 1px solid #dedede;text-align: center;margin-bottom: 20px;">
      <div style="position: relative;">  
        <img src="http://imgtest-dl.meiliworks.com/pic/r/b4/e6/17a2898af3df4cd2fc1ae29fa50b_800_800.jpeg" style="width:100%;height:{height}px;">        
        <span style="position: absolute;top: 5px;left: 5px;background-color: #bcbcbc;padding:2px;">￥100.00</span>
        <a href="" class="btn btn-primary btn-small" style="position: absolute;top:5px;right: 70px"><i class="icon-folder-open icon-white"></i> | 37</a>
        <a href="" class="btn btn-primary btn-small" style="position: absolute;top:5px;right: 5px"><i class="icon-comment icon-white"></i> | 16</a>
      </div>
      <div style="border-bottom: 1px solid #dedede;padding: 10px;text-align: left;font-size: 12px;">
        羊羔毛内胆麂皮绒个性外套～好喜欢
      </div>
      <div style="padding:10px;text-align: left;">
        <img src="http://tp3.sinaimg.cn/1315648622/180/5641007290/0" style="width:20px"/><a href="">小顶的昵称可以很长很长</a>
        <span style="float:right;font-size: 12px;">(3小时前)</span>
      </div>
    </div>
aaa;

$arr = array();
for ($i=0; $i < 5; $i++) { 
	$rnd_h = mt_rand(50,150);
	$arr[] = str_replace('{height}', $rnd_h, $a);
}
echo json_encode($arr);